<?php 
	class Madmin extends CI_Model {


		function login($username, $password)
		{
		//this func will log the user in as admin in the data 
  		//mathes and save it in the session
  		$sha1pass = sha1($password);
  		$this->db->where('username', $username);
  		$this->db->where('password', $sha1pass);
  		$query = $this->db->get('admin');
  		$return = $query->result_array();  		
  		if($query->num_rows() > 0){
  			return $return[0]['user_id'];
  		}	
  		else{
  			return FALSE;
  		}
    }


    


	}




?>